/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

/* 
 * File:   CSwitchStruct.h
 * Author: Administrator
 *
 * Created on 2018年11月20日, 下午5:05
 */

#ifndef CSWITCHSTRUCT_H
#    define CSWITCHSTRUCT_H
//数据类型结构体
#include"PublicTool.h"
//存储相关信息
//端口表，ARP表，IP表，路由表
typedef struct _ipNetToMediaTable{
char 		ipNetToMediaNetAddress[16];
char 		ipNetToMediaPhysAddress[18];
uint32_t    ipNetToMediaIfIndex;
uint32_t    ipNetToMediaType;
}ipNetToMediaTable;
typedef std::map<std::string,ipNetToMediaTable>MAPIPNETTOMEDIATABLE;
typedef struct _ipv6NetToMediaTable{
char 		ipv6NetToMediaNetAddress[40];
char 		ipv6NetToMediaPhysAddress[18];
uint32_t    ipv6NetToMediaIfIndex;
uint32_t    ipv6NetToMediaType;
}ipv6NetToMediaTable;
typedef std::map<std::string,ipv6NetToMediaTable>MAPIPV6NETTOMEDIATABLE;
//IP表
typedef struct _ipAddrTable{
char        ipAdEntAddr[16];
uint32_t    ipAdEntIfIndex;
char        ipAdEntNetMask[16]; 
}ipAddrTable;
typedef std::map<std::string,ipAddrTable>MAPIPADDRTABLE;
typedef struct _ipv6AddrTable{
char        ipv6AddrAddress[40];
uint32_t    ipv6IfIndex;
uint32_t    ipv6AddrPfxLength; 
}ipv6AddrTable;
typedef std::map<std::string,ipv6AddrTable>MAPIPV6ADDRTABLE;
//路由表
typedef struct _ipRouteTable{
char        ipRouteNextHop[16];//当主键
char        ipRouteDest[16];
char        ipRouteMask[16];
uint32_t    ipRouteifIndex;
uint32_t    ipRouteType;
uint32_t    ipRouteProto;
}ipRouteTable;
typedef std::map<std::string,ipRouteTable>MAPIPROUTETABLE;
typedef struct _ipv6RouteTable{
char        ipv6RouteNextHop[40];//当主键
char        ipv6RouteDest[40];
uint32_t    ipv6RoutePfxLength;
uint32_t    ipv6RouteIndex;
uint32_t    ipv6RouteifIndex;
uint32_t    ipv6RouteType;
uint32_t    ipv6RouteProto;
}ipv6RouteTable;
//key使用ipv6RouteDest ipv6RoutePfxLength ipv6RouteIndex拼接
typedef std::map<std::string,ipv6RouteTable>MAPIPV6ROUTETABLE;
//端口表
typedef struct _FdbTable{
char        FdbAddress[18];
uint32_t    FdbPort;
uint32_t    FdbStatus;
}FdbTable;
typedef std::map<std::string,FdbTable>MAPFDBTABLE;
#endif /* CSWITCHSTRUCT_H */

